index_of

pure function index_of(text: text): integer

Search for the first occurrence of the specified substring within this text.

Return

the index of the first occurrence of the substring within this text, or -1 if the substring does not occur in this text

Since

0.9.0

Parameters

text

the substring for which to search


pure function index_of(text: text, start: integer): integer

Returns the position of the first occurrence of the specified substring within this text, starting at the specified index, or -1 if the text is not found.

Since

0.9.0

Parameters

text

the substring for which to search

start

the index from which to start the search